<template>
  <!-- 输入框-输入框 -->
  <div class="LInput_root" :style="`width: ${width}px`">
    <span>{{ label }}</span>
    <el-input type="text" :placeholder="placeholder" v-model="value" clearable />-
    <el-input type="text" :placeholder="placeholder2" v-model="value2" clearable />

    <!-- 在自定义组件中通过$attr、$listeners获取定义的属性、监听等 -->
  </div>
</template>

<script>
export default {
  name: "LInput",

  props: {
    value: String,
    value2: String,
    label: {
      type: String,
      default: "地区",
    },
    width: {
      type: Number,
      default: 320,
    },
    placeholder: {
      type: String,
      default: "",
    },
    placeholder2: {
      type: String,
      default: "",
    },
  },
  data() {
    return {};
  },
  updated() {
    this.$emit("input-event", this.value);
    this.$emit("input-event2", this.value2);
  },
  methods: {},
};
</script>

<style lang="less" scoped>
/deep/ .el-input__inner {
  background-color: transparent; //! !important;
}

.LInput_root {
  height: 40px;
  background-image: url("../assets/img/1.png");
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  padding: 0 6px 10px 20px;
  box-sizing: border-box;

  span {
    font-size: 15px;
    font-weight: 400;
    color: #b8f9ff;
    padding: 0 9px;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  input {
    flex: 1;
    height: 100%;
    margin-left: 10px;
    border: none;
    user-select: none;
    outline: none;
    background: transparent;
    color: #6392d3;
  }
}
</style>
